package com.nju.galaxywalker.location;

import android.content.Context;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;

public class Address {
	  
	  private String name;
	  private Location loc;
     
      public Address(String name,Location loc){
    	  this.name=name;
    	  this.loc=loc;
      }
      public void changeName(String name){
    	  this.name=name;
      }
      public String getName(){
    	  return this.name;
      }
      public void changeLoc(Location loc){   	  
 		  this.loc=loc;
      }
      public Location getLoc(){
    	  return this.loc;
      }
      public boolean isNear(Address add,double distance){
          if(loc.distanceTo(add.getLoc())<distance)
    	      return true;
          return false;
      }
      
}
